import {service as request} from '@/utils/request'


/**
 * 查询 模板
 * 24.4
 * @param {*} data 
 * @returns 
 */
export function getList(data) {
  return request({
    url: `/hawk/template/search/${data.page.current}/${data.page.size}`,
    method: 'get',
    params:data.query
  })
}

/**
 * 新增模板
 * @param {*} data 
 * @returns 
 */
export function doAdd(data){
  console.log(data, '-- 添加模板');
  data.isdefault=1
  return request({
      url: '/hawk/template/save',
      method: 'post',
      data
  })
}

export function searchList(data){
    return request({
        url: `/moniter-host/name/${data}`,
        method: 'get'
      })
}

export function doEdit(data) {
  return request({
    url: '/hawk/template/update',
    method: 'put',
    data
  })
}
export function doDelete(ids) {
  return request({
    url: `/hawk/template/del`,
    method: 'delete',
    data:ids
  })
}
export function getOne(id) {
  return request({
    url: `/sys-user/id/${id}`,
    method: 'get'
  })
}
export function getAll() {
  return request({
    url: `/moniter-host`,
    method: 'get'
  })
}
